<template>
  <div class="collect">
    <perNav center="我的收藏"></perNav>
    <newBar v-for="(item,index) of collectList" :key="index" :postList=item></newBar>
  </div>
</template>

<script>
import perNav from "../../components/perNav";
import newBar from "../../components/newsBar";

export default {
  components: {
    perNav,
    newBar
  },
  data() {
    return {
      collectList: []
    };
  },
  methods: {
    collect() {
      this.$axios({
        method: "get",
        url: "/user_star"
      }).then(res => {
        const { data } = res.data;
        this.collectList = data;
      });
    }
  },
  mounted() {
    this.collect();
  }
};
</script>

<style>
</style>